package com.lw.sbdemo2.common.startup;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * <p>标题: CommandLineRunner启动加载</p>
 * <p>描述: @Order 注解的执行优先级是按value值从小到大顺序</p>
 * <p>版权: Copyright (c) 2018</p>
 * <p>公司: 智业软件</p>
 *
 * @author LinWang
 * @date 2018-06-21 14:04
 */
@Component
@Order(2)
@Slf4j
public class MyCommandLineRunner implements CommandLineRunner {

    @Override
    public void run(String... args) throws Exception {
        log.info("MyCommandLineRunner 启动加载~");
        for (String arg : args) {
            log.info("系统参数：{}", arg);
        }
    }
}